<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <title>隔行变色</title>
    <script type="text/javascript">
        //奇数偶数行显示颜色
        $(function () {
         $("tr:odd").css("background","#FFFFEE");
         $("tr:even").css("background","#FF6500");

        });

    </script>

</head>
<table border="2" solid="black" width="200px">
    <tr>
        <td>id</td>
        <td>姓名</td>
        <td>年龄</td>
    </tr>
    <tr>
        <td>1</td>
        <td>张三</td>
        <td>20</td>
    </tr>
    <tr>
        <td>2</td>
        <td>李四</td>
        <td>20</td>
    </tr>
    <tr>
        <td>3</td>
        <td>王五</td>
        <td>20</td>
    </tr>
    <tr>
        <td>4</td>
        <td>赵六</td>
        <td>20</td>
    </tr>
    <tr>
        <td>5</td>
        <td>青龙</td>
        <td>20</td>
    </tr>
    <tr>
        <td>6</td>
        <td>白虎</td>
        <td>20</td>
    </tr>
    <tr>
        <td>7</td>
        <td>朱雀</td>
        <td>20</td>
    </tr>
</table>
<body>

</body>
</html>